package com.deli.springboot.demojdkproxy;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MyJdkProxyFactory {
    private static final Logger logger = LoggerFactory.getLogger(MyJdkProxyFactory.class);



    @Test
    public void testJdkProxy(){
        logger.info("****this is my jdk proxy method*****");
        DemoJdkProxy jdkProxy = new DemoJdkProxyImpl();
        JdkProxyFactory jdkProxyFactory = new JdkProxyFactory(jdkProxy);
        DemoJdkProxy jdkProxyObject = (DemoJdkProxy) jdkProxyFactory.getProxyObject();

        jdkProxyObject.save();

        System.out.println("分割线——————————————————————————————————————");
        jdkProxyObject.find();

    }
}
